import request from '@/utils/request.js'
import { useTokenStore } from '@/stores/token.js';
//教师学生课堂列表查询
export const studentAllQuestionService = (conversationID) => {
    console.log(conversationID)
    // return {'data':[
    //     {
    //         "questionID": 132,
    //         "conversationID": 34,
    //         "questionContent": "c语言是什么",
    //         "answerContent": "是一种名为c语言的语言"
    //     },
    //     {
    //         "questionID": 535,
    //         "conversationID": 44,
    //         "questionContent": "什么是面向对象",
    //         "answerContent": "是面朝着对象"
    //     },
    //     {
    //         "questionID": 573,
    //         "conversationID": 46,
    //         "questionContent": "python的发展史",
    //         "answerContent": "发展出来了python"
    //     },
    //     {
    //         "questionID": 468,
    //         "conversationID": 57,
    //         "questionContent": "c++和c的区别 ",
    //         "answerContent": "多了两个加号"
    //     },
    //     {
    //         "questionID": 468,
    //         "conversationID": 57,
    //         "questionContent": "c++和c的区别 ",
    //         "answerContent": "多了两个加号"
    //     },
    //     {
    //         "questionID": 468,
    //         "conversationID": 57,
    //         "questionContent": "c++和c的区别 ",
    //         "answerContent": "多了两个加号"
    //     }
    // ]}
    let tokenStore = useTokenStore()
    const headers = {
        token: tokenStore.token.token
    }
    const params = new URLSearchParams()
    params.append('conversationID',conversationID)
    const config = {  
        headers: headers,  
        params: params  
    };  
    return request.get('/teacher/getdetailconversation',config);
}